package cn.xiaopengstack.test.framework.singleton;

import cn.xiaopengstack.types.framework.strategy.link.singleton.AbstractLogicLink;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component("singletonRule1")
@Slf4j
public class Rule1 extends AbstractLogicLink<Object, LinkSingletonFactory.DynamicContext, RuleResponse> {

    @Override
    public RuleResponse apply(Object request, LinkSingletonFactory.DynamicContext dynamic) throws Exception {
        log.info("正在执行规则rule01.....");
        dynamic.setNumber("123");
        return next().apply(request, dynamic);
    }
}
